<?php echo $this->doctype() ?>
<html>
    <head>
        <?php
        echo $this->jQuery()
                  ->setVersion('1.5.1')
                  ->setUiVersion('1.8.11')
                  ->enable()
                 ->uiEnable();
        ?>
        <?php echo $this->headMeta(); ?>
        <?php echo $this->headScript(); ?>
        <?php echo $this->headTitle(); ?>
        <?php echo $this->headLink()->appendStylesheet('/css/custom-theme/jquery-ui-1.8.22.custom.css'); ?>

        <link rel="stylesheet" type="text/css" media="screen" href="<?php echo $this->baseUrl(); ?>/jqgrid/css/ui.jqgrid.css" />
        <style>
        html, body {
            margin: 0;
            padding: 0;
        }
        input, textarea {
            font-size:12px !important;
        }
        * {
            font-family: Verdana,Arial,sans-serif;
        }
        ul.errors li {
            font-size : 12px;
            color:red;
        }
        div#flash_messages {
            width:100%;
            font-size:12px;
            padding:15px 0 0 0;
        }
        div#flash_messages p {
            padding-left:10px; 
        }
        #left_sidebar {
            font-size: 12px;
        }
        #left_sidebar ul {
            list-style:none;
            padding-left:0px;
        }
        tr td:first-child {
            font-size:12px
        }
        </style>
        <script src="<?php echo $this->baseUrl(); ?>/jqgrid/js/i18n/grid.locale-<?php $locale = Zend_Registry::get('Zend_Locale'); echo $locale->getLanguage(); ?>.js" type="text/javascript"></script>
        <script src="<?php echo $this->baseUrl(); ?>/jqgrid/js/jquery.jqGrid.min.js" type="text/javascript"></script>

    </head>
    <body>
        <script>
            CMessageBox = function() {
            }
            CMessageBox.prototype.TYPE_ERROR = 'error';
            CMessageBox.prototype.displayMessage = function(type, text) {
                for (var i = 0; i < 100; i++) {
                    if ($("#message"+i).attr('id') != "message"+i) {
                        $('#flash_messages').append('<div id="message'+i+'">'+text+'</div>');
                        $("#message"+i).message({type:type,dismiss: false});
                        window.location = "#message"+i;
                        return false;
                    }
                }
            }
            CMessageBox.prototype.clearMessages = function() {
                $('#flash_messages div').remove();
            }
            MessageBox = new CMessageBox();
        </script>
        <?php $this->jQuery()->onLoadCaptureStart(); ?>
        $(document).ready(function(){
            $('#switcher').themeswitcher();
            $("input:submit, input:button").button();
        });
        <?php $this->jQuery()->onLoadCaptureEnd(); ?>
        <script type="text/javascript" src="http://jqueryui.com/themeroller/themeswitchertool/"></script>

        <table style="width:100%">
            <tr>
                <td valign="top" style="width:220px;padding: 5px;">
                    <div id="switcher"></div>
                    <br />
                    <?php echo $this->polyglot(); ?>
                    <br />
                    <?php echo $this->accordionPane('left_sidebar', $this->navigation()->menu(), array('title' => $this->translate('Management'))); ?>
                    <?php echo $this->accordionPane('left_sidebar', $this->partial('partial/account_details.phtml'), array('title' => $this->translate('Account details'))); ?>

                    <?php echo $this->accordionContainer('left_sidebar'); ?>
                    <br />
                </td>
                <td valign="top">
                    <div id="flash_messages">
                        <?php echo $this->messageBox(); ?>
                    </div>
                    <?php echo $this->layout()->content; ?>
                </td>
            </tr>
        </table>
        <?php echo $this->jQuery()->setRenderMode(ZendX_JQuery::RENDER_JAVASCRIPT | ZendX_JQuery::RENDER_JQUERY_ON_LOAD); ?>
    </body>
</html>